<?php

/*
 * This file is part of the gedongdong/laravel_rbac_permission.
 *
 * (c) gedongdong <gedongdong2010@163.com>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace App\Http\Models;

class Role extends BaseModel
{
    protected $guarded = [];

    public function permissions()
    {
        return $this->belongsToMany(Permission::class, RolePermission::class)
                    ->whereNull('role_permissions.deleted_at');
    }
}
